home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Source / GNU / libg++ / libio / tests / Makefile.in < prev    next >
Makefile  |  1994-02-15  |  6KB  |  194 lines

  1. # Copyright (C) 1993 Free Software Foundation
  2. # This file is part of the GNU IO Library.  This library is free
  3. # software; you can redistribute it and/or modify it under the
  4. # terms of the GNU General Public License as published by the
  5. # Free Software Foundation; either version 2, or (at your option)
  6. # any later version.
  7. # This library is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10. # GNU General Public License for more details.
  11. # You should have received a copy of the GNU General Public License
  12. # along with GNU CC; see the file COPYING.  If not, write to
  13. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  14.  
  15. srcdir = .
  16.  
  17. CFLAGS = -g
  18. C_FLAGS = $(CFLAGS) -I. -I.. -I$(srcdir) -I$(srcdir)/..
  19. CXXFLAGS = -g
  20. CXX_FLAGS = $(CXXFLAGS) -I. -I.. -I$(srcdir) -I$(srcdir)/..
  21. CC = gcc
  22. CXX = gcc
  23.  
  24. #### package, host, target, and site dependent Makefile fragments come in here.
  25. ##
  26.  
  27. STDIO_LD_FLAGS = -u __cleanup
  28.  
  29. #LIBS = ../../libg++.a
  30.  
  31. #LIBSTDIO = ../stdio/libstdio++.a
  32. #LIBIO = ../libio.a
  33.  
  34. #STDIOLIBS = $(STDIO_LD_FLAGS) $(LIBSTDIO) $(LIBIO) $(LIBS)
  35. STDIOLIBS = $(LIBSTDIO) $(LIBIO) $(LIBS)
  36. IOLIBS = ../libiostream.a ../../libiberty/libiberty.a
  37. IOSTDIOLIB = ../libio.a ../../libiberty/libiberty.a
  38.  
  39. DEPEND_SOURCES = $(srcdir)/*.C
  40.  
  41. .PHONY: check check-iostream check-stdio
  42. check: check-iostream check-iostdio
  43.  
  44.  
  45. # These are tests written in C++, that test the iostream facility.
  46. check-iostream: check-tFile check-tiomisc \
  47.    check-hounddog check-putbackdog check-tiomanip
  48.  
  49. # These are tests written in C, that don't need C++.
  50. # They test libio's emulation of stdio.
  51. check-iostdio: check-tiformat check-tfformat check-tstdiomisc
  52.  
  53. # check-stdio runs test programs that use stdio.
  54. # These aren't run by default because there may be linker tricks needed
  55. # to build them (if libc.a contains a competing stdio implementation).
  56.  
  57. check-stdio: check-tfseek check-twrseek check-trdseek check-tpopen
  58.  
  59. # See ${MOSTLYCLEAN} in configure.in
  60. JUNK_TO_CLEAN = tFile tiomisc hounddog putbackdog tiomanip \
  61.    t?format *.out streamfile ftmp*
  62.  
  63. .PHONY: info
  64. info:
  65. .PHONY: clean-info
  66. clean-info:
  67. .PHONY: install-info
  68. install-info:
  69.  
  70. tst: tst.o
  71.     gcc -v -o tst tst.o $(STDIOLIBS)
  72.  
  73. tgetl: tgetl.o
  74.     $(CXX) -o tgetl tgetl.o $(IOLIBS)
  75.  
  76. tFile: tFile.o
  77.     $(CXX) -o tFile tFile.o $(IOLIBS)
  78.  
  79. tiomisc: tiomisc.o
  80.     $(CXX) -o tiomisc tiomisc.o $(IOLIBS)
  81.  
  82. hounddog: hounddog.o
  83.     $(CXX) -o hounddog hounddog.o $(IOLIBS)
  84.  
  85. check-hounddog: hounddog
  86.     ./hounddog <$(srcdir)/hounddog.inp > hounddog.out 2>&1
  87.     diff -c hounddog.out $(srcdir)/hounddog.exp
  88.     ./hounddog -b0 <$(srcdir)/hounddog.inp > hound-b0.out 2>&1
  89.     diff -c hound-b0.out $(srcdir)/hounddog.exp
  90.     ./hounddog -b2 <$(srcdir)/hounddog.inp > hound-b2.out 2>&1
  91.     diff -c hound-b2.out $(srcdir)/hounddog.exp
  92.  
  93. putbackdog: putbackdog.o
  94.     $(CXX) -o putbackdog putbackdog.o $(IOLIBS)
  95.  
  96. check-putbackdog-regular: putbackdog
  97.     ./putbackdog <$(srcdir)/hounddog.inp > putback.out 2>&1
  98.     diff -c putback.out $(srcdir)/hounddog.exp
  99. check-putbackdog-nobuf: putbackdog
  100.     ./putbackdog -b0 <$(srcdir)/hounddog.inp > putback-b0.out 2>&1
  101.     diff -c putback-b0.out $(srcdir)/hounddog.exp
  102. check-putbackdog-buf2: putbackdog
  103.     ./putbackdog -b2 <$(srcdir)/hounddog.inp > putback-b2.out 2>&1
  104.     diff -c putback-b2.out $(srcdir)/hounddog.exp
  105. check-putbackdog: \
  106.   check-putbackdog-regular check-putbackdog-nobuf check-putbackdog-buf2
  107.  
  108. tfseek: tfseek.o
  109.     $(CC) -o tfseek tfseek.o $(STDIOLIBS)
  110.  
  111. check-tfseek: tfseek
  112.     ./tfseek SEEK_SET fopen > tfseek-set-fopen.out 2>&1
  113.     diff -c tfseek-set-fopen.out $(srcdir)/tfseek-set.exp
  114.     ./tfseek SEEK_SET freopen > tfseek-set-freopen.out 2>&1
  115.     diff -c tfseek-set-freopen.out $(srcdir)/tfseek-set.exp
  116.     ./tfseek SEEK_CUR fopen > tfseek-cur-fopen.out 2>&1
  117.     diff -c tfseek-cur-fopen.out $(srcdir)/tfseek-cur.exp
  118.     ./tfseek SEEK_CUR freopen > tfseek-cur-freopen.out 2>&1
  119.     diff -c tfseek-cur-freopen.out $(srcdir)/tfseek-cur.exp
  120.  
  121. twrseek: twrseek.o
  122.     $(CC) -o twrseek twrseek.o $(STDIOLIBS)
  123.  
  124. check-twrseek: twrseek
  125.     ./twrseek > twrseek.out 2>&1
  126.     diff -c twrseek.out $(srcdir)/twrseek.exp
  127.  
  128. trdseek: trdseek.o
  129.     $(CC) -o trdseek -v trdseek.o $(STDIOLIBS)
  130.  
  131. check-trdseek: trdseek
  132.     ./trdseek
  133.  
  134. check-tFile-regular: tFile
  135.     ./tFile < $(srcdir)/tFile.inp > tFile.out 2>&1
  136.     diff -c tFile.out $(srcdir)/tFile.exp
  137. # Run tFile with cout.rdbuf() unbuffered.
  138. check-tFile-nobuf: tFile
  139.     ./tFile -b0 < $(srcdir)/tFile.inp > tFile-buf0.out 2>&1
  140.     diff -c tFile-buf0.out $(srcdir)/tFile.exp
  141. # Run tFile with a 3-byte buffer for cout.rdbuf().
  142. check-tFile-buf3: tFile
  143.     ./tFile -b3 < $(srcdir)/tFile.inp > tFile-buf3.out 2>&1
  144.     diff -c tFile-buf3.out $(srcdir)/tFile.exp
  145. check-tFile: check-tFile-regular check-tFile-nobuf check-tFile-buf3
  146.  
  147. check-tiomisc: tiomisc
  148.     ./tiomisc >tiomisc.out 2>&1
  149.     diff -c tiomisc.out $(srcdir)/tiomisc.exp
  150.  
  151. tiomanip: tiomanip.o
  152.     $(CXX) -o tiomanip tiomanip.o $(IOLIBS)
  153. check-tiomanip: tiomanip
  154.     ./tiomanip >tiomanip.out 2>&1
  155.     diff -c tiomanip.out $(srcdir)/tiomanip.exp
  156.  
  157. tfformat: tfformat.o
  158.     $(CC) $(C_FLAGS) -DTEST_LIBIO -DTEST_EXACTNESS \
  159.       -o tfformat $(srcdir)/tfformat.c $(IOSTDIOLIB)
  160.  
  161. check-tfformat: tfformat
  162.     ./tfformat
  163.  
  164. tiformat: $(srcdir)/tiformat.c
  165.     $(CC) $(C_FLAGS) -DTEST_LIBIO -o tiformat $(srcdir)/tiformat.c $(IOSTDIOLIB)
  166.  
  167. check-tiformat: tiformat
  168.     ./tiformat
  169.  
  170. tstdiomisc: tstdiomisc.o
  171.     $(CC) -o tstdiomisc tstdiomisc.o $(IOSTDIOLIB)
  172.  
  173. check-tstdiomisc: tstdiomisc
  174.     ./tstdiomisc
  175.  
  176. tpopen: tpopen.o
  177.     $(CC) -o tpopen tpopen.o $(STDIOLIBS)
  178.  
  179. check-tpopen: tpopen
  180.     ./tpopen > tpopen.out 2>&1
  181.     diff -c tpopen.out $(srcdir)/tpopen.exp
  182.  
  183. trwseek: trwseek.o
  184.     $(CC) -o trwseek trwseek.o $(STDIOLIBS)
  185.  
  186. check-trwseek: trwseek
  187.     ./trwsseek  TMP r+ k w o
  188.  
  189. foo+: foo+.o
  190.     $(CXX) -o foo+ foo+.o $(IOLIBS)
  191.